package com.projectpractice.common.utils;

import org.apache.shiro.crypto.hash.SimpleHash;

/**
 * @author TangLuJie
 * @date 2020/7/5 19:23
 */
public class Md5Util {
    private static final String ALGORITH_NAME = "md5";
    private static final int HASH_ITERATIONS = 1024;

    public static String encrypt(String username, String password){
        return new SimpleHash(ALGORITH_NAME,password,username,HASH_ITERATIONS).toHex();
    }
}
